/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package net.jonbuck.tassoo.model.impl;

import net.jonbuck.tassoo.model.Attachment;
import net.jonbuck.tassoo.model.AttachmentContainer;
import net.jonbuck.tassoo.model.AttachmentType;
import net.jonbuck.tassoo.model.AttachmentTypes;
import net.jonbuck.tassoo.model.BaseObject;
import net.jonbuck.tassoo.model.Categories;
import net.jonbuck.tassoo.model.Category;
import net.jonbuck.tassoo.model.Comment;
import net.jonbuck.tassoo.model.Containers;
import net.jonbuck.tassoo.model.Priorities;
import net.jonbuck.tassoo.model.Priority;
import net.jonbuck.tassoo.model.Recurrence;
import net.jonbuck.tassoo.model.ReferenceModel;
import net.jonbuck.tassoo.model.Status;
import net.jonbuck.tassoo.model.Statuses;
import net.jonbuck.tassoo.model.Task;
import net.jonbuck.tassoo.model.Tassoo;
import net.jonbuck.tassoo.model.TassooFactory;
import net.jonbuck.tassoo.model.TassooPackage;
import net.jonbuck.tassoo.model.Type;
import net.jonbuck.tassoo.model.Types;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class TassooFactoryImpl extends EFactoryImpl implements TassooFactory {
	/**
	 * Creates the default factory implementation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static TassooFactory init() {
		try {
			TassooFactory theTassooFactory = (TassooFactory)EPackage.Registry.INSTANCE.getEFactory("http://net.jonbuck/tassoo"); 
			if (theTassooFactory != null) {
				return theTassooFactory;
			}
		}
		catch (Exception exception) {
			EcorePlugin.INSTANCE.log(exception);
		}
		return new TassooFactoryImpl();
	}

	/**
	 * Creates an instance of the factory.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public TassooFactoryImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EObject create(EClass eClass) {
		switch (eClass.getClassifierID()) {
			case TassooPackage.ATTACHMENT: return createAttachment();
			case TassooPackage.ATTACHMENT_TYPE: return createAttachmentType();
			case TassooPackage.ATTACHMENT_TYPES: return createAttachmentTypes();
			case TassooPackage.ATTACHMENT_CONTAINER: return createAttachmentContainer();
			case TassooPackage.BASE_OBJECT: return createBaseObject();
			case TassooPackage.CATEGORIES: return createCategories();
			case TassooPackage.CATEGORY: return createCategory();
			case TassooPackage.COMMENT: return createComment();
			case TassooPackage.CONTAINER: return createContainer();
			case TassooPackage.CONTAINERS: return createContainers();
			case TassooPackage.PRIORITY: return createPriority();
			case TassooPackage.PRIORITIES: return createPriorities();
			case TassooPackage.RECURRENCE: return createRecurrence();
			case TassooPackage.REFERENCE_MODEL: return createReferenceModel();
			case TassooPackage.STATUS: return createStatus();
			case TassooPackage.STATUSES: return createStatuses();
			case TassooPackage.TASK: return createTask();
			case TassooPackage.TASSOO: return createTassoo();
			case TassooPackage.TYPE: return createType();
			case TassooPackage.TYPES: return createTypes();
			default:
				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object createFromString(EDataType eDataType, String initialValue) {
		switch (eDataType.getClassifierID()) {
			default:
				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String convertToString(EDataType eDataType, Object instanceValue) {
		switch (eDataType.getClassifierID()) {
			default:
				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Attachment createAttachment() {
		AttachmentImpl attachment = new AttachmentImpl();
		return attachment;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public AttachmentType createAttachmentType() {
		AttachmentTypeImpl attachmentType = new AttachmentTypeImpl();
		return attachmentType;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public AttachmentTypes createAttachmentTypes() {
		AttachmentTypesImpl attachmentTypes = new AttachmentTypesImpl();
		return attachmentTypes;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public AttachmentContainer createAttachmentContainer() {
		AttachmentContainerImpl attachmentContainer = new AttachmentContainerImpl();
		return attachmentContainer;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public BaseObject createBaseObject() {
		BaseObjectImpl baseObject = new BaseObjectImpl();
		return baseObject;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Categories createCategories() {
		CategoriesImpl categories = new CategoriesImpl();
		return categories;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Category createCategory() {
		CategoryImpl category = new CategoryImpl();
		return category;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Comment createComment() {
		CommentImpl comment = new CommentImpl();
		return comment;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public net.jonbuck.tassoo.model.Container createContainer() {
		ContainerImpl container = new ContainerImpl();
		return container;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Containers createContainers() {
		ContainersImpl containers = new ContainersImpl();
		return containers;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Priority createPriority() {
		PriorityImpl priority = new PriorityImpl();
		return priority;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Priorities createPriorities() {
		PrioritiesImpl priorities = new PrioritiesImpl();
		return priorities;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Recurrence createRecurrence() {
		RecurrenceImpl recurrence = new RecurrenceImpl();
		return recurrence;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ReferenceModel createReferenceModel() {
		ReferenceModelImpl referenceModel = new ReferenceModelImpl();
		return referenceModel;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Status createStatus() {
		StatusImpl status = new StatusImpl();
		return status;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Statuses createStatuses() {
		StatusesImpl statuses = new StatusesImpl();
		return statuses;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Task createTask() {
		TaskImpl task = new TaskImpl();
		return task;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Tassoo createTassoo() {
		TassooImpl tassoo = new TassooImpl();
		return tassoo;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Type createType() {
		TypeImpl type = new TypeImpl();
		return type;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Types createTypes() {
		TypesImpl types = new TypesImpl();
		return types;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public TassooPackage getTassooPackage() {
		return (TassooPackage)getEPackage();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @deprecated
	 * @generated
	 */
	@Deprecated
	public static TassooPackage getPackage() {
		return TassooPackage.eINSTANCE;
	}

} //TassooFactoryImpl
